package team.lourd.network.system.batch.ext.support;

import net.sf.json.JSONObject;
import team.lourd.network.system.batch.ext.ParameterResolver;

import java.util.Map;

/**
 * JSON参数解析器
 *
 * @author JADemo
 * @date 2019/2/21 13:41
 */
public class JsonObjectParameterResolver implements ParameterResolver<JSONObject> {
    // 判断当前参数是否为JSONObject
    @Override
    public boolean support(Class<JSONObject> type) {
        return type.isAssignableFrom(JSONObject.class);
    }

    // 解析JSON参数
    @Override
    public Map<String, Object> resolve(JSONObject json) {
        return json;
    }
}
